package com.ruoyi.web.controller.tea;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.tea.domain.TeaCount;
import com.ruoyi.tea.service.ITeaCountService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 【请填写功能名称】Controller
 * 
 * @author hmx
 * @date 2023-06-08
 */
@RestController
@RequestMapping("/tea/count")
public class TeaCountController extends BaseController
{
    @Autowired
    private ITeaCountService teaCountService;

    /**
     * 查询【请填写功能名称】列表
     */
    @PreAuthorize("@ss.hasPermi('tea:count:list')")
    @GetMapping("/ordct")
    public TeaCount orderlist()
    {
        TeaCount teact=new TeaCount();
        teact = teaCountService.selectOrderCount();
        return teact;
    }
    @GetMapping("/leafct")
    public TeaCount leaflist()
    {
        TeaCount teact=new TeaCount();
        teact = teaCountService.selectLeafCount();
        return teact;
    }
    @GetMapping("/dayct")
    public TeaCount daycount()
    {
        TeaCount teact=new TeaCount();
        teact = teaCountService.selectDayCount();
        return teact;
    }
    @GetMapping("/yesct")
    public TeaCount yescount()
    {
        TeaCount teact=new TeaCount();
        teact = teaCountService.selectYesCount();
        return teact;
    }
    @GetMapping("/weekct")
    public TeaCount weekcount()
    {
        TeaCount teact=new TeaCount();
        teact = teaCountService.selectWeekCount();
        return teact;
    }
    @GetMapping("/monthct")
    public TeaCount monthcount()
    {
        TeaCount teact=new TeaCount();
        teact = teaCountService.selectMonthCount();
        return teact;
    }
    @GetMapping("/store")
    public List<TeaCount> teascount()
    {
       List<TeaCount> tl=teaCountService.selectTeaNum();
        return tl;
    }
}
